package com.java.lang.clon;

import java.util.Date;

import com.xa.common.utils.json.JsonUtils;

public class ShallowCopy implements Cloneable {
    private Date begin;

    public Date getBegin() {
        return this.begin;
    }

    public void setBegin(Date d) {
        this.begin = d;
    }

    public Object clone() {
        Object obj = null;
        try {
            obj = super.clone();
        } catch (CloneNotSupportedException ex) {
            ex.printStackTrace();
        }
        return obj;
    }

    public static void main(String[] args) {
        ShallowCopy sc = new ShallowCopy();
        ShallowCopy copy = (ShallowCopy) sc.clone();
        System.out.println(JsonUtils.object2String(copy));
    }
}
